package com.lcu.wl.modules.mnt.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统日志
 * </p>
 *
 * @author wanglei
 * @since 2021-03-12
 */
@TableName("mnt_log")
public class Log implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    private Long logId;

    /**
     * 描述
     */
    private String description;

    /**
     * 日志类型
     */
    private String logType;

    /**
     * 请求方法
     */
    private String method;

    /**
     * 参数
     */
    private String params;

    /**
     * IP地址
     */
    private String requestIp;

    /**
     * 请求耗时
     */
    private Long time;

    /**
     * 用户名
     */
    private String username;

    /**
     * 地址
     */
    private String address;

    /**
     * 浏览器
     */
    private String browser;

    /**
     * 异常详情
     */
    private byte[] exceptionDetail;

    /**
     * 创建时间
     */
    private Date createTime;

    public Log() {
    }

    public Log(Long logId, String description, String logType, String method, String params, String requestIp, Long time, String username, String address, String browser, byte[] exceptionDetail, Date createTime) {
        this.logId = logId;
        this.description = description;
        this.logType = logType;
        this.method = method;
        this.params = params;
        this.requestIp = requestIp;
        this.time = time;
        this.username = username;
        this.address = address;
        this.browser = browser;
        this.exceptionDetail = exceptionDetail;
        this.createTime = createTime;
    }

    public Log(String logType, Long time) {
        this.logType = logType;
        this.time = time;
    }

    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public String getLogType() {
        return logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }
    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }
    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }
    public String getRequestIp() {
        return requestIp;
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }
    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }
    public byte[] getExceptionDetail() {
        return exceptionDetail;
    }

    public void setExceptionDetail(byte[] exceptionDetail) {
        this.exceptionDetail = exceptionDetail;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Log{" +
            "logId=" + logId +
            ", description=" + description +
            ", logType=" + logType +
            ", method=" + method +
            ", params=" + params +
            ", requestIp=" + requestIp +
            ", time=" + time +
            ", username=" + username +
            ", address=" + address +
            ", browser=" + browser +
            ", exceptionDetail=" + exceptionDetail +
            ", createTime=" + createTime +
        "}";
    }
}
